<include file="../Public/header_sh.html" />
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>

<style>
#map-box {
    border: 0px solid #EAEAEA;
    height: 625px;
    width: 100%;
}
.addr-box {
    padding: 5px 10px;
	border-bottom: 1px solid #E6E6E6;
}
.addr-box dl {
	
}
.addr-box dt {
    font-size: 14px;
    font-weight: bold;
    line-height: 25px;
	color: #3C8DDF;
	margin: 0px;
}
.addr-box dd {
    line-height: 18px;
    padding-left: 14px;
	padding: 0 0 0 15px;
	color: #999999;
    font-size: 11px;
    line-height: 20px;
}
.seq {
    color: #CA0809;
    font-family: Georgia,Consolas;
    font-size: 16px;
    padding-right: 5px;
}
.addr {
    font-weight: bold;
}
.phone {
    font-weight: bold;
}
.intro {
    border-bottom: 1px solid #EAEAEA;
    margin: 20px 0;
    padding-bottom: 20px;
    width: inherit;
}
.intro h1 {
    border-bottom: 1px solid #EAEAEA;
    color: #CA0809;
    font-size: 25px;
    line-height: 35px;
    margin-bottom: 5px;
    padding-bottom: 3px;
}
.intro p {
    line-height: 22px;
    padding-left: 5px;
}
.addr-box_on {
    background-color: #F8FCFF;
}
</style>


<script type="text/javascript">
	function initstyle(){
	    $("#bsub_list_area").find('#addr_drief').each(function(){
	    	$(this).hover(
	    		      function () {
	    			  		$(this).addClass("addr-box_on");
	    			  },
	    			  function () {
	    			        $(this).removeClass("addr-box_on");
	    			  }
	    	);
	    });
	}
	
	var map;
	var currentinfowindow;
  	function load_map() {
    	var latlng = new google.maps.LatLng(39.925, 116.385);
    	var myOptions = {
      		zoom: 11,
      		center: latlng,
      		mapTypeId: google.maps.MapTypeId.ROADMAP
    	};
    	map = new google.maps.Map(document.getElementById("map-box"), myOptions);
  	}
 	
  
  	$(document).ready(function(){
  		load_map();
  		initstyle();
  	});
  
  	function showBsubInfo(index){
  		clearOverlays();
		//markersArray[index].click();
		setMapCenter(markersArray[index].getPosition());
  		markersArray[index].setMap(map);
  		infowinArray[index].open(map,markersArray[index]);
  		map.setZoom(18);
  	}
  	
  	function setMapCenter(latlng){
  		map.setCenter(latlng);
  	}
  	
  	var markersArray = [];
  	var infowinArray = [];
  	// Removes the overlays from the map, but keeps them in the array
  	function clearOverlays() {
  	  if (markersArray) {
  	    for (i in markersArray) {
  	    	//infowinArray[i].clase();
  	      	markersArray[i].setMap(null);
  	    }
  	  }
  	}

  	// Shows any overlays currently in the array
  	function showOverlays() {
  	  if (markersArray) {
  	    for (i in markersArray) {
  	      markersArray[i].setMap(map);
  	    }
  	  }
  	}

  	// Deletes all markers in the array by removing references to them
  	function deleteOverlays() {
  	  if (markersArray) {
  	    for (i in markersArray) {
  	      markersArray[i].setMap(null);
  	    }
  	    markersArray.length = 0;
  	  	infowinArray.length = 0;
  	  }
  	}
  

  	function goPageBSub(pno){
		$.kajax({      
			url:"{:U('shanghu://Subsh/ajxSearchBSub')}",      
			type:'post', //数据发送方式  
			data:{brandid:$('#bsub_search_data').find('#brandid').val()
					,area_id:$('#bsub_search_data').find('#area_id').val()
					,city_id:$('#bsub_search_data').find('#city_id').val()
					,pno:pno} ,    
			async: false ,//同步方式     
			success: function(html){ 
				$('#bsub_list_area').html(html);
			}
		});
	}

</script>

    <!--  START CONTENT WRAPPER -->
    <div id="content_wrapper">
	
      <!--  START PRIMARY CONTENT style="position: relative;"-->
      <div id="primary_content">

        <h2>店铺分布图</h2>
        <div class="clear"></div>
       	<div id="map-box">
        </div>
        <div class="clear"></div>
        <!-- <div class="full-map"> <a href="#" onclick="load_map()">查看完整地图</a></div> -->
        <div class="clear"></div>
        <div class="intro">
        	<h1>说明:</h1>
        	{$brandExtInfo['explain']}
            <!-- 
            <p><span class="seq">1. </span>北京市区共计200家店，除机场店外，都能够通兑。</p>
            <p><span class="seq">2. </span>店家营业时间为6:00~22:00，具体店面以具体店面公布为准</p>
            <p><span class="seq">3. </span>对于需要定制的商品，请先电话确认。</p>
            -->
        </div>
      </div>
      <!--  END PRIMARY CONTENT -->
      
      
 	  <!--  START SIDEBAR -->
      <div id="sidebar">
        <h3>店铺列表</h3>
        
        
        <div id="bsub_list_area" style="margin-bottom:10px">
			<php>$bsub_brandid = $brandBasInfo['id'];</php>
        	<include file="../shanghu/Tpl/default/Subsh/bsub_list_box.html" />
		</div>
        
      </div><!--  end div #sidebar -->
      <!--  END SIDEBAR -->
    </div><!--  end div #content_wrapper -->
<!--  END CONTENT_WRAPPER -->

<include file="../Public/footer_sh.html" />